import http from '../../tool/http'

const state={
    gzglDada:[],
    currentData:0,
}

const actions={
    DataA({commit},num){
        if(num===undefined){
            num=1;
        }
        num=(num-1)*5
        return http({
            url:'/mgrsite/salaryController/getSalaryData',
            method: 'post',
            data:{num1:num,num2:5}
        }).then(res=>{
            commit('getData',res.data.data)
            // console.log(res)
            return 200
        })
    },
    DataCount({commit}){
        return http({
            url:'/mgrsite/salaryController/getSalaryCount',
            method: 'post',
        }).then(res=>{
            commit('getDataA',res.data.count)
            // console.log(res)
            return 200
        })
    }
}
const mutations = {
    getData(state,obj){
        state.gzglDada = obj
    },
    getDataA(state,obj){
        state.currentData = obj
    },

}



export default {
    state,
    actions,
    mutations
}